package com.example.rxjava;

import android.app.Activity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

public class MainActivity extends AppCompatActivity implements Runnable {

    Thread thread;
    private static final Singleton<People> peopleSingleton = new Singleton<People>() {
        @Override
        protected People create() {
            return new People();
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

    }


    private boolean test() {
        try {
            try {
                if (MainActivity.this instanceof Activity) {
                    throw new IllegalThreadStateException();
                }
            } finally {

            }
        } finally {

        }

        return false;
    }


    @Override
    public void run() {
        thread.interrupt();
        if (Thread.interrupted()) {
            Log.e("hello", "world");
        }
        try {
            thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Log.e("after", "sleep");
    }


    class Node {
        Node next;
    }


}
